<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创作中心 - 图文视频社交App</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="components.css">
    <style>
        .upload-area {
            border: 2px dashed #ddd;
            border-radius: 12px;
            padding: 30px;
            text-align: center;
            background-color: #f9f9f9;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .upload-area:hover {
            border-color: #ff2d55;
            background-color: #fff0f3;
        }
        
        .upload-icon {
            font-size: 48px;
            color: #ff2d55;
            margin-bottom: 16px;
        }
        
        .create-tab {
            padding: 12px 0;
            text-align: center;
            font-weight: 600;
            color: #666;
            border-bottom: 3px solid transparent;
            transition: all 0.3s;
        }
        
        .create-tab.active {
            color: #ff2d55;
            border-bottom-color: #ff2d55;
        }
        
        .media-preview {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 16px;
        }
        
        .media-preview img, .media-preview video {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }
        
        .remove-media {
            position: absolute;
            top: 8px;
            right: 8px;
            background-color: rgba(0,0,0,0.5);
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    </style>
</head>
<body>
    <!-- 状态栏 -->
    <div class="status-bar">
        <div class="status-bar-time">14:30</div>
        <div class="status-bar-icons">
            <i class="fas fa-signal"></i>
            <i class="fas fa-wifi"></i>
            <i class="fas fa-battery-full"></i>
        </div>
    </div>

    <!-- 顶部导航 -->
    <div class="flex justify-between items-center px-4 py-2 bg-white">
        <div class="text-xl font-bold text-pink-600">创作中心</div>
        <div class="text-pink-600 font-medium">草稿箱</div>
    </div>

    <!-- 创作类型选择 -->
    <div class="grid grid-cols-3 bg-white">
        <div class="create-tab active">图文</div>
        <div class="create-tab">视频</div>
        <div class="create-tab">直播</div>
    </div>

    <!-- 创作内容区域 -->
    <div class="content-container p-4">
        <!-- 上传区域 -->
        <div class="upload-area mb-4">
            <i class="fas fa-cloud-upload-alt upload-icon"></i>
            <div class="text-lg font-medium mb-2">点击上传</div>
            <div class="text-sm text-gray-500">支持图片、视频格式</div>
        </div>

        <!-- 媒体预览区域 -->
        <div class="grid grid-cols-2 gap-3 mb-4">
            <div class="media-preview">
                <img src="https://images.unsplash.com/photo-1522383225653-ed111181a951" alt="预览图片">
                <div class="remove-media">
                    <i class="fas fa-times"></i>
                </div>
            </div>
            <div class="media-preview">
                <img src="https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e" alt="预览图片">
                <div class="remove-media">
                    <i class="fas fa-times"></i>
                </div>
            </div>
        </div>

        <!-- 标题输入 -->
        <div class="bg-white rounded-lg p-3 mb-4">
            <input type="text" placeholder="添加标题（选填）" class="w-full border-none focus:outline-none text-lg">
        </div>

        <!-- 内容输入 -->
        <div class="bg-white rounded-lg p-3 mb-4">
            <textarea placeholder="分享你的创作内容..." class="w-full border-none focus:outline-none h-32 resize-none"></textarea>
        </div>

        <!-- 话题和位置 -->
        <div class="flex mb-4">
            <div class="bg-white rounded-full py-2 px-4 mr-3 flex items-center">
                <i class="fas fa-hashtag text-pink-600 mr-2"></i>
                <span class="text-sm">添加话题</span>
            </div>
            <div class="bg-white rounded-full py-2 px-4 flex items-center">
                <i class="fas fa-map-marker-alt text-pink-600 mr-2"></i>
                <span class="text-sm">添加位置</span>
            </div>
        </div>

        <!-- 权限设置 -->
        <div class="bg-white rounded-lg p-4 mb-4">
            <div class="font-medium mb-3">权限设置</div>
            <div class="flex justify-between items-center mb-3">
                <div class="flex items-center">
                    <i class="fas fa-eye text-gray-500 mr-3"></i>
                    <span>公开</span>
                </div>
                <i class="fas fa-chevron-right text-gray-400"></i>
            </div>
            <div class="flex justify-between items-center">
                <div class="flex items-center">
                    <i class="fas fa-comment-alt text-gray-500 mr-3"></i>
                    <span>允许评论</span>
                </div>
                <div class="relative inline-block w-10 align-middle select-none">
                    <input type="checkbox" name="toggle" id="toggle" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer checked:right-0 checked:border-pink-600" checked/>
                    <label for="toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
                </div>
            </div>
        </div>

        <!-- 发布按钮 -->
        <button class="primary-button py-3 text-lg">发布</button>
    </div>

    <!-- 底部导航栏 -->
    <div class="tab-bar">
        <div class="tab-item">
            <i class="fas fa-home tab-icon"></i>
            <span>首页</span>
        </div>
        <div class="tab-item">
            <i class="fas fa-search tab-icon"></i>
            <span>搜索</span>
        </div>
        <div class="tab-item active">
            <i class="fas fa-plus-circle tab-icon" style="font-size: 32px; margin-top: -5px;"></i>
            <span>创作</span>
        </div>
        <div class="tab-item">
            <i class="far fa-bell tab-icon"></i>
            <span>消息</span>
        </div>
        <div class="tab-item">
            <i class="far fa-user tab-icon"></i>
            <span>我的</span>
        </div>
    </div>

    <script src="app.js"></script>
    <script>
        // 处理创作类型选项卡切换
        const createTabs = document.querySelectorAll('.create-tab');
        createTabs.forEach(tab => {
            tab.addEventListener('click', function() {
                createTabs.forEach(t => t.classList.remove('active'));
                this.classList.add('active');
            });
        });
        
        // 模拟上传功能
        const uploadArea = document.querySelector('.upload-area');
        uploadArea.addEventListener('click', function() {
            alert('选择媒体文件上传');
        });
        
        // 模拟删除媒体
        const removeButtons = document.querySelectorAll('.remove-media');
        removeButtons.forEach(button => {
            button.addEventListener('click', function(e) {
                e.stopPropagation();
                const mediaPreview = this.parentElement;
                mediaPreview.remove();
            });
        });
    </script>
</body>
</html> 